﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfCore.Configers
{
    public class BonusConfigers : IEntityTypeConfiguration<Bonus>
    {
        public void Configure(EntityTypeBuilder<Bonus> builder)
        {
            builder.ToTable(nameof(Bonus));

            builder.HasKey(e => e.BonId);

            builder.Property(e => e.BonId).ValueGeneratedOnAdd();

            builder.Property(e => e.MajorKindName).HasMaxLength(50);
            builder.Property(e => e.MajorName).HasMaxLength(50);
            builder.Property(e => e.HumanName).HasMaxLength(50);
            builder.Property(e => e.BonusItem).HasMaxLength(100);
            builder.Property(e => e.BonusDegree).HasMaxLength(50);
            builder.Property(e => e.Remark).HasMaxLength(500);
            builder.Property(e => e.Register).HasMaxLength(50);
            builder.Property(e => e.Checker).HasMaxLength(50);
            builder.Property(e => e.CheckStatus).HasMaxLength(20);
        }
    }
}
